package com.blockchain.coupon.dao;

import com.blockchain.coupon.entity.*;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by wufaxiang on 2017/1/13.
 * 商户Mapper类
 */
public interface MerchantMapper {


    public Merchant queryMerchantByAccount(@Param("merchantAccount") String merchantAccount);

    public int insertMerchant(Merchant merchant);

    public int updateMerchantInfo(@Param("merchantId") String merchantId, @Param("merchantName") String merchantName, @Param("merchantDescription") String merchantDescription);

    public int updateMerchantPassword(@Param("merchantId") String merchantId, @Param("merchantNewPassword") String merchantNewPassword);

    public List<BankCard> queryBankCardByMerchantId(@Param("merchantId") String merchantId);

    public Merchant queryMerchantByMerchantId(@Param("merchantId") String merchantId);

    public int insertClearingTicket(ClearingTicket clearingTicket);

    public List<ClearingTicketOperationLog> queryClearingTicketOperationLog(String merchantId, String startTime, String endTime);

    public List<ClearingTicketOperationLog> queryClearingTicketOperationLogListByMerchantId(@Param("merchantId") String merchantId,  @Param("startTime")String startTime, @Param("endTime")String endTime);

    public int insertCouponRule(CouponRule couponRule);

    public  CouponRule queryCouponRuleByMerchantId(String merchantId);
}
